package svc

import (
	"diff.wang/asynqsrv/clienthttp/internal/config"
	"github.com/hibiken/asynq"
)

type ServiceContext struct {
	Config      config.Config
	AsynqClient *asynq.Client
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config:      c,
		AsynqClient: asynq.NewClient(asynq.RedisClientOpt{Addr: c.Redis.Host, Password: c.Redis.Pass, DB: c.RedisDB}),
	}
}
